# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年03月11日
"""

from docx import Document

doc = Document('demo.docx')

# 每一段内容
for para in doc.paragraphs:
	print(para.text)

# 每一段的编号、内容
for i in range(len(doc.paragraphs)):
	print(str(i), doc.paragraphs[i].text)

# 表格

tbs = doc.tables
for tb in tbs:
	# 行
	for row in tb.rows:
		# 列
		for cell in row.cells:
			print(cell.text)
